package com.mr.shiro.webapps.system.entity;

import lombok.Data;
import org.springframework.stereotype.Component;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.HashSet;
import java.util.Set;

/**
 * Class: Role
 * User (作者):MRui
 * TODO (描述)：权限
 * Date 2019-01-13 17:30
 */
@Data
@Entity
public class Role {

    @Id//主键
    private  Integer rid;

    private  String name;

    @Transient//数据库映射忽略掉
    private Set<Permission> permissions = new HashSet<>();
    @Transient//数据库映射忽略掉
    private Set<User> users = new HashSet<>();
}
